package com.example.a16478095_;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.Toast;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class orderMenu extends AppCompatActivity {
    private CheckBox login;

    private Food whr,hszt,lhxy,jc,pg,xcr;
    private CheckBox cb_whr,cb_hszt,cb_lhxy,cb_jc,cb_pg,cb_xcr;
    private  int totalPrice=0;
    private Button submit;
    private CheapCard c1,c2;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu);
        login =  findViewById(R.id.tv_whr);

        login.setOnClickListener(new View.OnClickListener(){

                                     @Override
                                     public void onClick(View v) {

                                         Toast.makeText(orderMenu.this,"已选五花肉",Toast.LENGTH_SHORT).show();

                                     }
                                 });


        init();

    }
    public void init(){
        whr = new Food("五花肉",30,"月销300份，好评率100%");
        hszt = new Food("红烧猪蹄",25,"月销100，佳绩");
        lhxy = new Food("莲花血鸭",20,"好评率90%");
        jc = new Food("鸡翅",40,"好评率50");
        pg = new Food("排骨",40,"好评率60");
        xcr = new Food("小炒肉",20,"好评率59");

        List<HashMap<String,Object>> myData = new ArrayList<HashMap<String, Object>>();
        HashMap itemData1 = new HashMap();
        itemData1.put("name","五花肉");
        itemData1.put("price","30");
        itemData1.put("info","月销300份，好评率100%");

        HashMap itemData2 = new HashMap();
        itemData2.put("name","红烧猪蹄");
        itemData2.put("price","25");
        itemData2.put("info","月销300份，好评率100%");

        HashMap itemData3 = new HashMap();
        itemData3.put("name","莲花血鸭");
        itemData3.put("price","20");
        itemData3.put("info","月销300份，好评率100%");

        HashMap itemData4 = new HashMap();
        itemData4.put("name","鸡翅");
        itemData4.put("price","40");
        itemData4.put("info","月销300份，好评率100%");

        HashMap itemData5 = new HashMap();
        itemData5.put("name","排骨");
        itemData5.put("price","40");
        itemData5.put("info","月销300份，好评率100%");

        HashMap itemData6 = new HashMap();
        itemData6.put("name","小炒肉");
        itemData6.put("price","20");
        itemData6.put("info","月销300份，好评率100%");

        myData.add(itemData1);
        myData.add(itemData2);
        myData.add(itemData3);
        myData.add(itemData4);
        myData.add(itemData5);
        myData.add(itemData6);

    }


}
